package com.heima.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Menu implements Serializable {
    private String icon;                        //标识
    private String isCache;                     //是否缓存      1:缓存    0:不缓存
    private String isFrame;                     //是否外链      1:是      0:否
    private Integer menuId;                     //菜单id
    private String menuName;                    //菜单名称
    private String menuType;                    //菜单类型      M:目录     F:按钮   C:菜单
    private Integer parentId;                   //表示父菜单的menuId
    private String component;                   //组件路径
    private String parentName;
    private String orderNum;                    //显示排序
    private String path;                        //路由地址
    private String perms;                       //权限标识（按钮）
    private String status;                      //菜单状态
    private String visible;                     //是否隐藏      不隐藏：0   隐藏：1
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;           //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;           //更改时间
    private List children = new ArrayList<>();  //子目录
}
